Skip to content

docs: linear retry strategy and retry helpers#211

Merged
yaythomas merged 1 commit into
mainfrom
docs/retry-helpers-and-linear-strategy
Jun 24, 2026
Merged

docs: linear retry strategy and retry helpers#211
yaythomas merged 1 commit into
mainfrom
docs/retry-helpers-and-linear-strategy

Conversation

@yaythomas

Copy link
Copy Markdown
Contributor

Documents the linear retry strategy helper and the retry helper for
durable operations that cannot live inside a step.

Changes to docs/sdk-reference/error-handling/retries.md

  • Restructure Configure a retry strategy so Exponential backoff and
    Linear backoff are sibling subsections, each with its own walkthrough,
    config signature, and delay-calculation block.
  • Add Retry a durable operation covering the retry helper:
    TypeScript withRetry, Python with_retry, Java
    DurableContext.withRetry / withRetryAsync. Explains when to use it
    instead of a step retry strategy (for invoke, waitForCallback,
    waitForCondition, etc., which cannot be inside a step).
  • Update Retry presets: add retryPresets.linear (TypeScript),
    RetryStrategies.Presets.LINEAR (Java), and
    RetryPresets.linear() / RetryPresets.fixed(interval) (Python).

New examples

  • linear-retry-strategy.{ts,py,java} — configures a linear strategy
    on a step.
  • linear-retry-strategy-config-signature.{ts,py,java} — config shape
    reference, mirroring the existing retry-strategy-config-signature.*.
  • with-retry-helper.{ts,py,java} — wraps an invoke with the retry
    helper.

The existing retry-presets.{ts,py,java} examples are updated to
demonstrate the new linear preset (and Python fixed).

Source verification

All signatures verified against origin/main of each SDK repo. One
correction relative to the issue text:

  • The TypeScript helper is withRetry, not retryOperation. It is
    exported from @aws/durable-execution-sdk-js (see
    packages/aws-durable-execution-sdk-js/src/utils/with-retry/index.ts
    and the package index.ts re-export).
  • Java RetryStrategies.linearBackoff (the existing factory name), not
    RetryStrategies.linear.

Verification

  • mdformat docs/sdk-reference/error-handling/retries.md is idempotent.
  • zensical build --clean finishes cleanly: No issues found.

Closes #155
Closes #209

@yaythomas yaythomas force-pushed the docs/retry-helpers-and-linear-strategy branch 4 times, most recently from 203a32c to 27c73cf Compare June 24, 2026 16:28
wangyb-A
wangyb-A previously approved these changes Jun 24, 2026
Comment thread examples/java/sdk-reference/error-handling/with-retry-helper.java Outdated
Document the linear retry strategy and the per-language retry helpers
in docs/sdk-reference/error-handling/retries.md. Closes #155 and #209.

- Restructure 'Configure a retry strategy' into sibling subsections
  for 'Exponential backoff' and 'Linear backoff', each with a
  walkthrough, config signature, and delay-calculation block.
- Add a 'Retry any durable operation' section for the helper
  (TypeScript withRetry, Python with_retry, Java withRetry and
  withRetryAsync) and contrast it with a step's own retryStrategy.
- Revise 'Retry presets' to document the new linear preset across all
  three languages and Python's RetryPresets.fixed(interval).
- Add nine new example files (linear-retry-strategy,
  linear-retry-strategy-config-signature, with-retry-helper) across
  TypeScript, Python, and Java.
- Refresh the existing retry-presets examples in all three languages
  to include the new presets.

All signatures verified against the SDK source on origin/main:
TypeScript createLinearRetryStrategy and withRetry, Python
create_linear_retry_strategy and with_retry, Java
RetryStrategies.linearBackoff overloads and DurableContext.withRetry.

Closes #155
Closes #209
@yaythomas yaythomas force-pushed the docs/retry-helpers-and-linear-strategy branch from 27c73cf to df19850 Compare June 24, 2026 18:51
@yaythomas yaythomas merged commit 51e01f4 into main Jun 24, 2026
3 checks passed
@yaythomas yaythomas deleted the docs/retry-helpers-and-linear-strategy branch June 24, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: linear retry strategy docs: withRetry helper

3 participants